
var countOnes=(left, right)=>(count=(n)=> n?(x=Math.log2(n)|0)*2**(x-1)+n-(2**x)+1+count(n-2**x):0)(right) - count(left-1);
